package com.takanafu.haru.core{
	public class CharacterType{
		public static const PLUS:int = 0x2B;	// [+]
		public static const MINUS:int = 0x2D;	// [-]
		public static const MUL:int = 0x2A;		// [*]
		public static const DEV:int = 0x2F;		// [/]
		public static const SCOL:int = 0x3B;	// [;]
		public static const LKAKKO:int = 0x28;	// [(]
		public static const RKAKKO:int = 0x29;	// [)]
		public static const EQUAL:int = 0x3D;	// [=]
		public static const DBLQ:int = 0x22;	// ["]
		public static const ESC:int = 0x1B;		// [¥]
		public static const EXC:int = 0x21;		// [!]
		public static const LES:int = 0x3C;		// [<]
		public static const GRE:int = 0x3E;		// [>]
		public static const AMP:int = 0x26;		// [&]
		public static const TATE:int = 0x7C;	// [|]
		public static const LNYORO:int = 0x7B;	// [{]
		public static const RNYORO:int = 0x7D;	// [}]
		public static const CONMA:int = 0x2C;	// [,]
		public static const DOT:int = 0x2E;		// [.]
		
		static public function isIdentifierStart(char:int):Boolean{
			if(	(0x41 <= char && char <= 0x5A) ||	// A - Z
				(0x61 <= char && char <= 0x7A) ||	// a - z
				char == 0x5F ||					// _
				char == 0x24					// $
			)return true;
				
			return false;
		}
		static public function isIdentifierPart(char:int):Boolean{
			if(0x30 <= char && char <= 0x39)return true;	// 0 - 9
			
			return isIdentifierStart(char);
		}
		static public function isWhileSpace(char:int):Boolean{
			if(	char == 0x09 ||	// HORIZONTAL TABULATION
				char == 0x0A ||	// LINE FEED
				char == 0x0B ||	// VERTICAL TABULATION
				char == 0x0C ||	// FORM FEED
				char == 0x0D ||	// CARRIAGE RETURN
				char == 0x1C ||	// FILE SEPARATOR
				char == 0x1D ||	// GROUP SEPARATOR
				char == 0x1E ||	// RECORD SEPARATOR
				char == 0x1F ||	// UNIT SEPARATOR
				char == 0x20	// SPACE
			)return true;
				
			return false;
		}
	}
}